home *** CD-ROM | disk | FTP | other *** search
- Path: sdrc.com!thor!scjones
- From: larry.jones@sdrc.com (Larry Jones)
- Newsgroups: comp.std.c
- Subject: Re: Meaning of __STDC__?
- Date: 13 Jan 1996 16:32:51 GMT
- Organization: SDRC Engineering Services
- Distribution: world
- Message-ID: <4d8mrj$p4v@info1.sdrc.com>
- References: <4d6673$8to@mailgate.bridgewater.ne.hcc.com>
- NNTP-Posting-Host: thor.sdrc.com
- Originator: scjones@thor
-
- In article <4d6673$8to@mailgate.bridgewater.ne.hcc.com>, kennedy@ (John W Kennedy) writes:
- > Is there an official statement as to what __STDC__ means? Does it mean "This
- > compiler (in its current operating mode) fully supports ANSI Standard C," or
- > does it mean "This compiler (in its current operating mode) disallows all
- > extensions to ANSI Standard C."? In my opinion, common practice and the
- > Rationale both support the former, rather than the latter, but is
- > there an official ruling?
-
- It means that the compiler defines __STDC__. :-)
-
- A conforming compiler is required to define it as 1. A non-conforming
- compiler isn't bound by the requirements of the standard, so it can
- define it any way it likes or not at all. Existing implementations are
- all over the map: I know of compilers that always define it (1 if the
- compiler is invoked in strictly conforming mode, 0 otherwise),
- compilers that define it only in strictly conforming mode, and others
- that define it in both strictly conforming and extended modes. I even
- know of one particularly perverse implementation (which is,
- fortunately, long gone by now) whose sole ANSI feature was defining
- __STDC__.
-
- The bottom line is, despite the committee's good intentions, __STDC__
- is essentially useless.
- ----
- Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH 45150-2789 513-576-2070
- larry.jones@sdrc.com
- I can do that! It's a free country! I've got my rights! -- Calvin
-